<template>
    <div>
      <input type="text" id="user" name="user" v-model="user"/>
      <input type="password" id="pwd" name="pwd" v-model="pwd">
      <mt-button type="primary" size="large" @click.native="login">登录</mt-button>
    </div>
</template>
<style></style>
<script>
    import util from '../util'

    export default {
      data () {
        return {
          user: '',
          pwd: ''
        }
      },
      methods: {
        login: function (e) {
          util.Cookie.set('user', this.user)
          this.$router.push('/home')
        }
      }
    }
</script>
